{  Statement: http://acmp.ru/?main=task&id_task=31
   Verdict: Accepted
}
uses
    SysUtils, Math;

var
    n, k : int64;  

function f(n : int64) : int64;

var
    i : longint;

begin
    result := 1;
    for i := 2 to n do
        result := result * i;
end;

function sf(n : int64) : int64;
begin
    result := round(f(n) / 2.718281);
end;

begin
    reset(input,'input.txt');
    rewrite(output,'output.txt');
    read(n, k);
    if n = k then write(1) else 
    write(sf(n - k) * f(n) div (f(k) * f(n - k)));
end.